﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace ModelSerialize
{
    /// <summary>
    /// 合并文件头
    /// </summary>
    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct MergeFileHeadInfo
    {
        /// <summary>
        /// 数据模型的Hash值
        /// </summary>
        public int ModelTypeHashCode { get; set; }

        /// <summary>
        /// 文件个数
        /// </summary>
        public int FileCount { get; set; }

        /// <summary>
        /// 开始时间戳
        /// </summary>
        public long StartTimeStamp { get; set; }

        /// <summary>
        /// 结束时间戳
        /// </summary>
        public long StopTimeStamp { get; set; }
    }

    /// <summary>
    /// 合并文件信息
    /// </summary>
    [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct MergeFileInfo
    {
        /// <summary>
        /// 索引文件位置
        /// </summary>
        public long IndexFilePosition { get; set; }

        /// <summary>
        /// 索引文件偏移
        /// </summary>
        public long IndexFileOffset { get; set; }

        /// <summary>
        /// 索引文件长度
        /// </summary>
        public long IndexFileLength { get; set; }

        /// <summary>
        /// 数据文件位置
        /// </summary>
        public long DataFilePosition { get; set; }

        /// <summary>
        /// 数据文件偏移
        /// </summary>
        public long DataFileOffset { get; set; }

        /// <summary>
        /// 数据文件长度
        /// </summary>
        public long DataFileLength { get; set; }
    }
}
